package com.konke.sdslibrary;


import com.konke.sdslibrary.factroy.SmartHomeFactory;

/**
 * 工厂模式，创建各种数据源：用户数据源、设备数据源等等
 */
public final class DataSourceFactory {

    protected static final Object MONITOR = new Object();

    private static SmartHomeFactoryApi sSmartCenterService = null;


    public static SmartHomeFactoryApi getSmartHomeFactory(SmartHomeCallback centerCallback) {
        synchronized (MONITOR) {
            if (sSmartCenterService == null) {
                sSmartCenterService = new SmartHomeFactory(centerCallback);
            }
            return sSmartCenterService;
        }
    }

}
